<?php 
session_start();          
	require_once "../includes/config.php";
	
	$fid=$_REQUEST['fid'];
	$sqlSelProfile="select * from tbl_feedback where fid=$fid";
	$rstSelProfile=mysql_query($sqlSelProfile);
	$rowSelProfile=mysql_fetch_array($rstSelProfile);
	
	$comment=$rowSelProfile['comment'];	
	$comm_by=getUser($rowSelProfile['comm_by']);
	$comm_to=getUser($rowSelProfile['comm_to']);	
	$post_on=$rowSelProfile['post_on'];	
	$rate=$rowSelProfile['rate'];
	$order_id=$rowSelProfile['order_id'];
	
	$seltrans=mysql_query("select * from tbl_orders where order_id=$order_id");
	$roworder=mysql_fetch_array($seltrans);
	$transno=$roworder['transaction_ID'];
	
	if($rate==1)
	  $srate="Great";
	else if($rate==2)
	  $srate="Acceptable";
	else if($rate==3)
	  $srate="Negative";
?>
<style type="text/css">
	table#tbl-profile tr td { vertical-align:middle; }
</style>
<table width="100%" height="611"  border="1" cellspacing="0" class='container'>
  <tr>
  	<td height="26" class="tdHeader">View Feedback </td>
  </tr>
  <tr>
    <td><table id="tbl-profile" width="80%" align="center"  border="0" cellspacing="0" cellpadding="0">
      
	  	  
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Feedback to </td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $comm_to; ?></td>
      </tr>
      
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33" >Feedback  </td>
        <td width="380" height="33" ><?php echo $comment; ?></td>
      </tr>
      
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Feedback by </td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $comm_by; ?></td>
      </tr>
      
      <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33" >Trans. #  </td>
        <td width="380" height="33" ><?php echo $transno; ?></td>
      </tr>
      
      <tr>
        <td width="37" bgcolor="#FBF1F1">&nbsp;</td>
        <td width="215" height="33" bgcolor="#FBF1F1">Post date </td>
        <td width="380" height="33" bgcolor="#FBF1F1"><?php echo $post_on; ?></td>
      </tr>
      
       <tr>
        <td width="37" >&nbsp;</td>
        <td width="215" height="33" >Rating  </td>
        <td width="380" height="33" ><?php echo $srate; ?></td>
      </tr>
      
	 
     <tr>
	 	<td>&nbsp;</td>
        <td height="98" colspan="2" ><a href="index.php?feedback">Back To List</a></td>
     </tr>
    </table></td>
  </tr>
</table>
